import { MockMethod } from "vite-plugin-mock";
export default [
  // 近30天工时
  {
    url: "/api/home/saleData",
    method: "get",
    response: () => {
      return {
        code: 200,
        message: "成功",
        data: {
          last30Days: [
            "06-28",
            "06-29",
            "06-30",
            "07-01",
            "07-02",
            "07-03",
            "07-04",
            "07-05",
            "07-06",
            "07-07",
            "07-08",
            "07-09",
            "07-10",
            "07-11",
            "07-12",
            "07-13",
            "07-14",
            "07-15",
            "07-16",
            "07-17",
            "07-18",
            "07-19",
            "07-20",
            "07-21",
            "07-22",
            "07-23",
            "07-24",
            "07-25",
            "07-26",
            "07-27",
          ],
          "orderNumList|30": ["@integer(100, 500)"],
          "saleMoneyList|30": ["@integer(1000, 5000)"],
          "returnMoneyList|30": ["@integer(0, 1000)"],
          "rechargeMoneyList|30": ["@integer(200, 2000)"],
        },
      };
    },
  },
  {
    url: "/api/home/categoryData",
    method: "get",
    response: () => {
      return {
        code: 200,
        message: "成功",
        "data|5": [
          {
            name: "@cname", // 英文名
            value: "@integer(8000, 50000)", // 8000-50000间的数字
          },
        ],
      };
    },
  },
  {
    url: "/api/home/top10",
    method: "get",
    response: () => {
      return {
        code: 200,
        message: "成功",
        "data|10": [{
            "name": "@cname", // 5-1000间的数字
            "consumeMoney|+10000": 2000
          }]
      };
    },
  },
] as MockMethod[];
